﻿package mortal.game.view.common.item
{
    import com.mui.core.*;
    import com.mui.display.*;
    import flash.text.*;
    import mortal.common.*;
    import mortal.common.font.*;
    import mortal.component.gconst.*;
    import mortal.game.resource.*;
    import mortal.game.view.common.*;

    public class MoneyItem2 extends MoneyItem
    {
        protected var _bg:ScaleBitmap;

        public function MoneyItem2()
        {
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            this._bg = UIFactory.bg(23, 0, 105, 20, this, ImagesConst.DisabledBg);
            super.createDisposedChildrenImpl();
            _bmpType.x = 0;
            _tfNum.x = 25;
            _tfNum.y = 3;
            _tfNum.width = 101;
            _tfNum.defaultTextFormat = new GTextFormat(FontUtil.songtiName, 12, 15859633, null, null, null, null, null, TextFormatAlign.LEFT);
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            super.disposeImpl(param1);
            this._bg.dispose(param1);
            this._bg = null;
            return;
        }// end function

        override public function updateMoneyBmpPos() : void
        {
            _bmpType.y = (this._bg.height - _bmpType.height) / 2;
            return;
        }// end function

        public function setBgName(param1:String) : void
        {
            var _loc_2:* = this._bg.width;
            var _loc_3:* = this._bg.height;
            this._bg.scale9Grid = ResourceConst.getRectangle(param1);
            this._bg.bitmapData = GlobalClass.getBitmapData(param1);
            this._bg.setSize(_loc_2, _loc_3);
            return;
        }// end function

    }
}
